﻿@model Vnsf.WebHost.Models.AnnouncementBindingModel

@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()

    <div class="form-horizontal">
        <h4>Announcement</h4>
        <hr />
        @Html.ValidationSummary(true)

        <div class="form-group">
            @Html.LabelFor(model => model.Announcement.Name, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Announcement.Name)
                @Html.ValidationMessageFor(model => model.Announcement.Name)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Announcement.Description, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Announcement.Description)
                @Html.ValidationMessageFor(model => model.Announcement.Description)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Announcement.Content, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Announcement.Content)
                @Html.ValidationMessageFor(model => model.Announcement.Content)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Announcement.StartDate, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Announcement.StartDate)
                @Html.ValidationMessageFor(model => model.Announcement.StartDate)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Announcement.Deadline, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Announcement.Deadline)
                @Html.ValidationMessageFor(model => model.Announcement.Deadline)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Announcement.MaxDuration, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Announcement.MaxDuration)
                @Html.ValidationMessageFor(model => model.Announcement.MaxDuration)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Announcement.EstimateTotal, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Announcement.EstimateTotal)
                @Html.ValidationMessageFor(model => model.Announcement.EstimateTotal)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Announcement.AwardCeiling, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Announcement.AwardCeiling)
                @Html.ValidationMessageFor(model => model.Announcement.AwardCeiling)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Announcement.AwardFloor, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Announcement.AwardFloor)
                @Html.ValidationMessageFor(model => model.Announcement.AwardFloor)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Announcement.PostDate, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Announcement.PostDate, "{0:d}")
                @Html.ValidationMessageFor(model => model.Announcement.PostDate)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Announcement.Opportunity, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownListFor(model => model.Announcement.OpportunityId, Model.Opportunities)
                @Html.ValidationMessageFor(model => model.Announcement.OpportunityId)
            </div>
        </div>


        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Create" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
